package com.x.erp.model;

import com.x.framework.annotation.MappingColumn;
import com.x.framework.annotation.MappingTable;
import com.x.framework.model.BaseObject;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 延保商品订单
 */
@MappingTable(tableName = "ERP_INSURANCE_ORDER")
public class InsuranceOrder extends BaseObject {

	private static final long serialVersionUID = 7608114506612107740L;

	@MappingColumn(columnName = "ORDER_ID", columnPk = true, columnLength = 32)
	private String orderId;// 延保商品订单Id

	@MappingColumn(columnName = "ORDER_NO")
	private String orderNo;// 订单编号

	@MappingColumn(columnName = "CONTRACT_ID")
	private String contractId;// 合同Id

	@MappingTable(tableName = "ERP_INSURANCE_CONTRACT")
	private InsuranceContract insuranceContract;// 合同信息

	@MappingColumn(columnName = "MARKET_ID")
	private String marketId;// 市场Id

	@MappingTable(tableName = "ERP_MARKET")
	private Market market;// 市场信息

	@MappingColumn(columnName = "SHOP_ID")
	private String shopId;// 商铺Id

	@MappingTable(tableName = "ERP_SHOP")
	private Shop shop;// 商铺信息

	@MappingColumn(columnName = "USER_ID")
	private String userId;// 用户Id

	@MappingTable(tableName = "USER_ID")
	private User user;// 用户信息

	@MappingColumn(columnName = "ORDER_PRICE")
	private BigDecimal orderPrice;// 订单金额（元）

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "ORDER_CREATE_TIME")
	private Date orderCreateTime;// 创建时间

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "ORDER_UPDATE_TIME")
	private Date orderUpdateTime;// 修改时间

	@MappingColumn(columnName = "ORDER_STATE")
	private Integer orderState;// 订单状态（0待审核 10使用中 20已完成 30已失效）

	@MappingColumn(columnName = "ORDER_NG_CONTENT")
	private String orderNgContent;// 审核不通过原因

	private List<InsuranceOrderGoods> orderGoodsList;

	@MappingTable(tableName = "ERP_INSURANCE_GOODS_VOUCHER")
	private List<InsuranceGoodsVoucher> goodsVoucherList;

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public InsuranceContract getInsuranceContract() {
		return insuranceContract;
	}

	public void setInsuranceContract(InsuranceContract insuranceContract) {
		this.insuranceContract = insuranceContract;
	}

	public String getMarketId() {
		return marketId;
	}

	public void setMarketId(String marketId) {
		this.marketId = marketId;
	}

	public Market getMarket() {
		return market;
	}

	public void setMarket(Market market) {
		this.market = market;
	}

	public String getShopId() {
		return shopId;
	}

	public void setShopId(String shopId) {
		this.shopId = shopId;
	}

	public Shop getShop() {
		return shop;
	}

	public void setShop(Shop shop) {
		this.shop = shop;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public BigDecimal getOrderPrice() {
		return orderPrice;
	}

	public void setOrderPrice(BigDecimal orderPrice) {
		this.orderPrice = orderPrice;
	}

	public Date getOrderCreateTime() {
		return orderCreateTime;
	}

	public void setOrderCreateTime(Date orderCreateTime) {
		this.orderCreateTime = orderCreateTime;
	}

	public Date getOrderUpdateTime() {
		return orderUpdateTime;
	}

	public void setOrderUpdateTime(Date orderUpdateTime) {
		this.orderUpdateTime = orderUpdateTime;
	}

	public Integer getOrderState() {
		return orderState;
	}

	public void setOrderState(Integer orderState) {
		this.orderState = orderState;
	}

	public String getOrderNgContent() {
		return orderNgContent;
	}

	public void setOrderNgContent(String orderNgContent) {
		this.orderNgContent = orderNgContent;
	}

	public List<InsuranceOrderGoods> getOrderGoodsList() {
		return orderGoodsList;
	}

	public void setOrderGoodsList(List<InsuranceOrderGoods> orderGoodsList) {
		this.orderGoodsList = orderGoodsList;
	}

	public List<InsuranceGoodsVoucher> getGoodsVoucherList() {
		return goodsVoucherList;
	}

	public void setGoodsVoucherList(List<InsuranceGoodsVoucher> goodsVoucherList) {
		this.goodsVoucherList = goodsVoucherList;
	}
}
